<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>项目风险管理系统</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f4f4f4;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
        }
        .login-container {
            background-color: white;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            width: 300px;
        }
        .login-container h2 {
            text-align: center;
            margin-bottom: 20px;
        }
        .login-container input[type="text"],
        .login-container input[type="password"] {
            width: 100%;
            padding: 10px 0;
            margin: 10px 0;
            border: 1px solid #ccc;
            border-radius: 4px;
        }
        .login-container button {
            width: 100%;
            padding: 10px;
            border: none;
            border-radius: 4px;
            background-color: #5cb85c;
            color: white;
            cursor: pointer;
            font-size: 16px;
        }
        .login-container button:hover {
            background-color: #4cae4c;
        }
        .login-container a {
            display: block;
            text-align: center;
            margin-top: 10px;
            text-decoration: none;
            color: #007bff;
        }
        .login-container a:hover {
            text-decoration: underline;
        }
    </style>
</head>
<body>
    <div class="login-container">
        <h2>项目风险管理系统</h2>
        <form action="/user/login" method="POST" onsubmit="encrypt()">
            <input type="text" name="username" placeholder=" 用户名" required>
            <input type="password" name="password" id="password" placeholder=" 密码" required>
            <button type="submit">登录</button>
        </form>
    </div>
</body>
<script src="/assets/md5.js"></script>
<script>
    function encrypt() {
        // 将密码框的值修改为md5加密后的
        document.getElementById('password').value = md5(document.getElementById('password').value)
    }
</script>
</html>